home *** CD-ROM | disk | FTP | other *** search
-
- ' ser_dev.bas
- ' This example program takes a measurement from a DVM using a
- ' SICL device session.
- Sub Main ()
- Dim dvm As Integer
- Dim strres As String * 20
- Dim i As Integer
- Dim actual As Long
-
- ' Open the multimeter session
- dvm = iopen("COM1,488")
- Call itimeout(dvm, 10000)
-
- ' Prepare the multimeter for measurements
- Call iwrite(dvm, ByVal "*RST" + Chr$(10), 5, 1, ByVal 0&)
- Call iwrite(dvm, ByVal "SYST:REM" + Chr$(10), 9, 1, ByVal 0&)
-
- ' Take a measurement
- Call iwrite(dvm, ByVal "MEAS:VOLT:DC?" + Chr$(10), 14, 1, ByVal 0&)
-
- ' Read the results
- Call iread(dvm, ByVal strres, 20, ByVal 0&, actual)
-
- ' Print the results
- MsgBox "Result is " + Left$(strres, actual), MB_ICON_EXCLAMATION
-
- ' Close the multimeter session
- Call iclose(dvm)
-
- ' Tell SICL to cleanup for this task
- Call siclcleanup
-
- End Sub
-
-